<div class="popup_body">
    <div class="ui_table">
        <iframe id="frame_${pid}" name="frame_${pid}" style="display:none;"></iframe>
        <form id="upload_form_${pid}" action="${contextPath}/security/basic/upgrade_pack/upload.htm?pid=${pid}"
              target="frame_${pid}" method="post" enctype="multipart/form-data">
            <table cellpadding="0" cellspacing="0">
                <tr>
                    <td width="70" align="right">升级类型：</td>
                    <td><input type="text" class="text" maxlength="20" required="true"
                               value="${(entity.upgradeName)!''}" readonly="readonly"/></td>
                </tr>
            </table>
        </form>
        <form method="post" id="form_${pid}">
            <input type="hidden" name="id" value="${entity.id}">
            <table cellpadding="0" cellspacing="0">
                <tr>
                    <td width="70" align="right">文件路径：</td>
                    <td><input type="text" maxlength="256" class="text" value="${(entity.filePath)!''}" required="true"
                               name="filePath" id="file_path_${pid}" style="height: 28px;"/></td>
                </tr>
                <tr>
                    <td width="70" align="right">文件名称：</td>
                    <td><input type="text" maxlength="256" class="text" value="${(entity.fileName)!''}" required="true"
                               name="fileName" id="file_name_${pid}" style="height: 28px;"/></td>
                </tr>
                <tr>
                    <td width="70" align="right">版本：</td>
                    <td><input type="text" maxlength="20" class="text" value="${(entity.version)!''}" required="true"
                               name="version"
                               id="version_${pid}" style="height: 28px;"/></td>
                </tr>
                <tr>
                    <td align="right" valign="top" style="padding-top:10px;">升级备注：</td>
                    <td><textarea maxlength="20" style="width:330px;" name="memo" value="${(entity.memo)!''}"></textarea>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>
<div class="popup_btn">
    <button class="btn btn_red ok">确定</button>
    <button class="btn btn_border close">关闭</button>
</div>
<script>
    (function () {
        var pid = '${pid}', win = $('#' + pid), form = $('#form_${pid}');

        win.find('button.ok').click(function () {
            form.form('submit', {
                url: '${contextPath}/security/basic/upgrade_pack/update_ios.htm',
                success: function (text) {
                    var json = $.evalJSON(text);
                <@app.json_jump/>
                    if (json.success) {
                        $.messager.alert('提示信息', '操作成功', 'info');
                        win.window('close');
                    } else {
                        $.messager.alert('提示信息', json.message, 'info');
                    }
                }
            });
        });
        win.find('button.close').click(function () {
            win.window('close');
        });
    })();
</script>